chore(auth): document required server env vars (force deploy)#2633
chore(auth): document required server env vars (force deploy)#2633
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Greptile SummaryThis PR adds a single documentation comment to Key points:
Confidence Score: 5/5Safe to merge — change is a doc comment only, with no logic or behaviour altered. The diff is a single comment line addition with no executable code changes. The sole risk is that the Vercel rebuild may not behave as expected if the env var was not correctly provisioned separately, but that is outside the scope of this code change. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant EdgeGW as Vercel Edge Gateway
participant AuthSession as server/auth-session.ts
participant ClerkJWKS as Clerk JWKS Endpoint
participant ClerkAPI as Clerk Backend API
Client->>EdgeGW: Request with Bearer token
EdgeGW->>AuthSession: validateBearerToken(token)
AuthSession->>ClerkJWKS: Fetch JWKS (cached, lazy via getJWKS())
ClerkJWKS-->>AuthSession: Public keys
AuthSession->>AuthSession: jwtVerify(token, jwks, { issuer, audience: [convex, CLERK_PUBLISHABLE_KEY] })
alt JWT has `plan` claim
AuthSession-->>EdgeGW: { valid: true, userId, role }
else Standard session token
AuthSession->>ClerkAPI: GET /v1/users/:userId (Bearer CLERK_SECRET_KEY)
ClerkAPI-->>AuthSession: User public_metadata.plan
AuthSession-->>EdgeGW: { valid: true, userId, role }
end
EdgeGW-->>Client: Response
|
Forces Vercel to rebuild with the CLERK_PUBLISHABLE_KEY env var that was added separately. Fixes 401 on /api/notification-channels introduced by #2024.